import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;


public class VCALENDAR {

	String calFile = "test.ics";
	String version = "VERSION:2.0";
	String prodId = "PRODID:default";

	public VCALENDAR() {
	}

	public String format(String vevent) {
		String output = "BEGIN:VCALENDAR\n" + version + "\n" + prodId + "\n"
				+ vevent + "END:VCALENDAR\n";
		return output;
	}
	
	public void write(String fileName, String content) throws IOException {
		File file = new File(fileName);
		BufferedWriter bw = new BufferedWriter(new FileWriter(file.getAbsoluteFile()));
		bw.write(content);
		bw.close();
	}
}
